home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / theapa / theapa.sty < prev   
Text File  |  1993-11-07  |  44KB  |  1,232 lines

  1.  
  2. %%%%theapa.sty%%%%%%%%
  3. %$$$ theapa.sty $$$  --- Version 2.5 .1(May 1992)
  4. %    by Young U. Ryu (young@emx.utexas.edu)
  5.  
  6. % `theapa' --- `the' `a'`p'`a'.
  7. % APA (American Psychology Association) Reference Citation for (AmS)LaTeX
  8. %
  9. %    - Supported by `theapa.bst' Version 2.5
  10. %    - For Plain TeX, use `theapa.tex'.
  11. %    - They are available from:
  12. %        anonymous@ftp.cc.utexas.edu
  13. %        pub/young
  14.  
  15. % Based on the {\it Publication Manual of the American Psychology Association},
  16. % Third Edition, Fifth Printing, February 1988.
  17.  
  18. % copyright (C) 1991, 1992.
  19. %    Young U. Ryu
  20. % newapa.sty 2.0 - 1991.
  21. %    Young U. Ryu
  22. % newapa.sty - copyright (C) 1989, 1990.
  23. %    Stephen N. Spencer
  24. % apalike.sty - copyright (C) 1986, 1988.
  25. %    Susan King and Oren Patashnik
  26. % ulem.sty - copyright (C) 1989.
  27. %    Donald Arseneau
  28.  
  29. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  30. % PLEASE, PLEASE, PLEASE READ ALL THE FOLLOWING UPDATE & TUTORIAL NOTES %
  31. % ^^^^^^  ^^^^^^  ^^^^^^      ^^^       BEFORE YOU REQUEST IMPROVEMENTS.%
  32. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  33.  
  34. %
  35. % List of User Commands
  36. %
  37. %  Citation (Auto Switch: Full -> Short)
  38. %    - \cite, \citeA, \citeauthor, \citeyear
  39. %  Enforce Full Citation
  40. %    - \fullcite, \fullciteA, \fullciteauthor
  41. %  Enforce Short Citation
  42. %    - \shortcite, \shortciteA, \shortciteauthor
  43. %  Change Citation Functuations
  44. %         including Quotation Marks around Article Titles
  45. %    - \citepunct
  46. %  Change Citation Labels
  47. %    - \citelabels
  48. %  Underline instead of Italic
  49. %    - \UnderlinedBemOnly, \UnderlinedEm
  50. %  Reference and Bibliography Names
  51. %    - \refname, \bibname
  52. %  Do not Place Comma before \& in Ref. Sec. When no. of Authors = 2
  53. %    - \NoCommaBetweenTwoAuthors
  54.  
  55. % IF YOU ARE A NEW USER, IT'S NOT NECESSARY TO READ UPDATE NOTES;
  56. % INSTEAD, READ THE TUTORIAL NOTES.
  57.  
  58. % Version 2.5.1 Update Notes (May 1992)
  59. %
  60. %   - A bug in \nocite#1 is fixed.
  61. %   - A bug in theapa.bst 2.5 is fixed.
  62.  
  63. % Version 2.5 Update Notes (April 1992)
  64. %
  65. %    - Citation macros are rewritten and simplified.
  66. %         \cite, \citeA, \citeauthor
  67. %         \fullcite, \fullciteA, \fullciteauthor
  68. %         \shortcite, \shortciteA, \shortciteauthor
  69. %         \citeyear
  70. %
  71. %      \citeB, \citeC, \fullciteB, \fullciteC, \shortciteB, and
  72. %      \shortciteC are dropped. But, to maintain compatibility
  73. %      with Version 2.4:
  74. %
  75. %          \citeB = \citeA (also full and short versions)
  76. %          \citeC = \citeauthor (also full and short versions)
  77. %
  78. %    - \BUcase is dropped. It means that BibTeX always
  79. %      changes cases of article titles.
  80. %      Thus, \NoTitleCaseChange is dropped.
  81. %      If you don't want to change cases of article titles,
  82. %      see Version 2.5 Update Notes in `theapa.bst'.
  83. %
  84. %    - APA section heading macros are re-written.
  85. %      \theapasectioning is dropped.
  86. %      Refer to the Tutorial Notes [5].
  87. %
  88. %    - Three types of seriations are provided:
  89. %         seriate env.
  90. %         APAenumerate env.
  91. %         APAitemize env.
  92. %      Refer to the Tutorial Notes [6].
  93.  
  94. % Version 2.4 Update Notes (April 1992)
  95. %
  96. %    - In Ref. Sec. (not in citations):
  97. %         ^^^^^^^^^
  98. %              Bond, J., & Chen, S. (1983). blah blah blah
  99. %                      ^
  100. %      comma is placed before \BBA (i.e. usually \&) even if
  101. %      no. of authors = 2. (a req. of APA)
  102. %      If you don't want such commas, use command \NoCommaBetweenTwoAuthors.
  103. %    - \cite<optional predix note>[optional postfix note]{keys}
  104. %      is implemented.
  105. %      The above is same as \fullcite and \shortcite.
  106. %    - \nocite{aaa,bbb} makes following \cite{aaa}, \cite{bbb}, etc. short.
  107. %      But, \nocite{*} does not make following \cite{...} short.
  108.  
  109. % Version 2.3 Update Notes (March 1992)
  110. %
  111. %    - theapa.bst 2.3 == theapa.bst 2.2
  112. %    - A few mistakes in notes and comments are corrected.
  113. %    - The following is updated:
  114. %      \citeA{...}, \citeB{...}, and \citeC{...} (together with
  115. %      full and short versions) result in:
  116. %
  117. %              author1, author2, and author3 (year)
  118. %                                ^^^
  119. %      while \cite{...} (together with full and short versions) results in:
  120. %
  121. %             (author1, author2, & author3, year)
  122. %                                ^
  123. %      The above is a requirement of the APA style.
  124. %
  125. %    - Thus, \citepunct changed. See note [3].
  126. %      With \citepunct, one may change the default `&' and `and' to others.
  127.  
  128. % Version 2.2 Update Notes (March 1992)
  129. %
  130. %    - theapa.sty 2.2 == theapa.sty 2.1
  131. %      But, theapa.bst is improved.
  132. %      See update notes in `theapa.bst'.
  133.  
  134. % Version 2.1 Update Notes
  135. %
  136. %    \thebibliography and chapter
  137. %             - \thebibliography generates a chapter heading
  138. %                 when chapter is defined (e.g., report, book, etc),
  139. %                 but \theapasectioning is not used.
  140. %             - Note: \def\refname{Reference}
  141. %                         `Reference' is the section title
  142. %                     \def\bibname{Bibliography}
  143. %                         `Bibliography' is the chapter title
  144. %
  145. %    Other Updates
  146. %             - \notitlecasechange (of Version 2.0) is changed
  147. %                to \NoTitleCaseChange for the purpose of readability.
  148. %
  149. %    Some Bugs Fixed
  150. %             - \thebibliography is fixed.
  151. %                 No more `TeX capacity exceeded' error when
  152. %                 \theapasectioning is used
  153.  
  154. % Version 2.0 Update Notes (Nov. 1991)
  155. %
  156. %    `ulem.sty' (1989) by Donald Arseneau is included
  157. %             - Underlined book titles, etc. are optionally allowed.
  158. %             - The general replacement of emphasized texts by
  159. %               underlined texts is optionally allowed.
  160. %             - See note [7] B.
  161. %
  162. %    Same author, different years
  163. %             - \cite{Apt,MinA,MinB,Bond}
  164. %               ===> (Apt, 1989; Minsky, 1967, 1983; Bond, 1991)
  165. %             - \citeB{Apt,MinA,MinB,Bond}
  166. %               ===> Apt (1989), Minsky (1967, 1983), Bond (1991)
  167. %             - \citeC{Apt,MinA,MinB,Bond} or \citeauthor{Apt,MinA,MinB,Bond}
  168. %               ===> Apt, Minsky, Bond
  169. %
  170. %    Automatic switch from full cites to short cites
  171. %             - According to the APA manual, the very first citation of
  172. %               a reference item requires the full list of authors; but
  173. %               following citations of the same reference item require
  174. %               the short list of authors.
  175. %             - \cite, \citeA, \citeB, \citeC (or \citeauthor)
  176. %               ===> switches from full to short cites automatically
  177. %             - \fullcite, \fullciteA, etc.
  178. %               ===> enforces full citations
  179. %             - \shortcite, \shortciteA, etc.
  180. %               ===> enforces short citations
  181. %             - note: \citeyear ===> (year, year, ...)
  182. %                     There are no full or short versions of \citeyear
  183. %
  184. %    Case changing option for article titles.
  185. %             - See note [7] A.
  186. %
  187. %    Quotation marks around article titles
  188. %             - Though the APA manual does not suggest to place
  189. %               double quotation marks around article titles,
  190. %               some people like it.
  191. %             - In that case, a comma (or period) following article
  192. %               titles must be placed inside quotation marks.
  193. %             - It can be done by `\citepunct'.
  194. %               See note [3].
  195. %
  196. %    Some Bugs Fixed
  197. %             - \theapasectioning replaces for \newapasectioning
  198. %             - \paragraph replaces for \a@paragraph
  199. %             - \subparagraph replaces for \a@subparagraph
  200.  
  201. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  202. % SEE THE FOLLOWING TUTORIAL NOTES.
  203. %   1 - theapa.bst and \bibitem entry
  204. %   2 - citation formats
  205. %   3 - changing citation functions (if you want)
  206. %   4 - changing citation labels (if you want)
  207. %   5 - enforcing APA style section heading (if you want)
  208. %   6 - APA style seriations
  209. %   7 - notes (including things not implemented and to be implemented)
  210. %
  211. %%%%%
  212. % [0] Three Parts
  213. %
  214. % This file consists of three parts:
  215. %   Part I   - APA Style Citation
  216. %   Part II  - Optional APA Style Section Heading and Seriation
  217. %   Part III - Underline Stuff
  218. %
  219. %   - Part I and Part II are completely independent.
  220. %   - If one does not declare \UnderlinedBemOnly or \UnderlinedEm,
  221. %     Part I and Part III are independent.
  222. %   - If one replaces \ULine in Part II with \underbar (or \underline)
  223. %     Part II and Part III are independent.
  224. %
  225. %   - You may remove independent parts without affecting others.
  226. %
  227. %%%%%
  228. % [1] theapa.bst and \bibitem entry
  229. %
  230. % The ``theapa.bst'' BibTeX bibliography style creates references with labels:
  231. %       \protect\BCAY{full author list}{abbrev. author list}{year}
  232. %
  233. %%%%%
  234. % [2] Citation Formats
  235. %
  236. % The citations are enclosed within parentheses ``( ... )''
  237. %     as default. But one may change them using \citepunct.
  238. % Short author lists use the ``et al.'' construct.
  239. % These labels are processed by the following LaTeX commands:
  240. %
  241. %%%
  242. % \cite<optional prefix note>[optional notes]{Key(s)}
  243. %     -> (prefix note Authors, Year, optional notes)
  244. %     For example: \cite<e.g.\ see>[p.~32]{Apt88}
  245. %                       => (e.g. see Apt, 1988, p. 32)
  246. %     -> automatically switches from \fullcite to \shortcite
  247. % \citeA[optional notes]{keys}
  248. %     -> automatically switches from \fullciteA to \shortciteA
  249. % \citeB[optional notes>{keys}
  250. %     = \citeA
  251. % \citeauthor{key}
  252. %     -> automatically switches from \fullciteauthor to \shortciteauthor
  253. % \citeC{keys}
  254. %     = \citeauthor{keys}
  255. % \citeyear[optional notes]{key(s)} -> (Year1, Year2, ...)
  256. %
  257. %%%
  258. % \nocite{aaa,bbb} makes following \cite{aaa}, \cite{bbb}, etc.
  259. %     short citations.
  260. % \nocite{*} does not make following \cite{...}, etc. short citations.
  261. %                 ^^^
  262. %%%
  263. % \fullcite<optional prefix note>[optional notes]{Key(s)}
  264. %     -> (prefix note Authors1, Year1; Authors2, Year2; ..., optional notes)
  265. % \fullciteA[optional notes]{keys}
  266. %     -> Authors1 (Year1), ..., AuthorsN (YearN, optional notes)
  267. % \fullciteB[optional notes]{keys}
  268. %     = \fullciteA[optional notes]{keys}
  269. % \fullciteauthor{keys}
  270. %     -> Authors1, Authors2, ...
  271. % \fullciteC{keys}
  272. %     = \fullciteauthor
  273. %
  274. %%%
  275. % The difference between `\shortciteXXX' and `\fullciteXXX':
  276. % is that `\shortciteXXX' gives `First author et al.'
  277. % if no. authors >= 3.
  278. %    
  279. % \shortcite<optional prefix note>[optional notes]{Key(s)}
  280. %     -> (prefix note Short Authors1, Year1; ..., optional notes)
  281. % \shortciteA[optional notes]{keys}
  282. %     -> Short Authors1 (Year1), ..., Short AuthorsN (YearN, optional notes)
  283. % \shortciteB[optional notes]{keys}
  284. %     = \shortciteA[optional notes]{keys}
  285. % \shortciteauthor{keys}
  286. %     -> Short Authors1, Short Authors2, ...
  287. % \shortciteC{keys}
  288. %     = \shortciteauthor
  289. %
  290. %%%%%
  291. % [3] Changing Citation Punctuations
  292. %
  293. % \citepunct{open paren}%
  294. %           {between authors in parenthesis and ref. sec}%
  295. %           {between authors in text}%
  296. %           {between author(s) and year}%
  297. %           {between citations}%
  298. %           {before notes}%
  299. %           {closing paren}%
  300. %           {open quote for article titles}%
  301. %           {closing quote for article titles}
  302. %
  303. % For example,
  304. %   \citepunct{[}{and}{\&}{ }{, }{: }{]}{``}{,''}
  305. %        - use square brackets
  306. %          `and' between authors in parenthesis and ref. sec.
  307. %          '&' between authors in text
  308. %          space between author and year
  309. %          comma between citations
  310. %          comma before notes
  311. %     e.g. [Apt and van Emden 1986, Lloyd 1985: Notes]
  312. %     e.g. Apt & van Emden [1986]
  313. %        - ``article title,''  (in double quote marks and comma in them)
  314. %
  315. % The default is:
  316. %   \citepunct{(}{\&}{and}{, }{; }{, }{)}{}{.}
  317. %
  318. % Notice spaces around punctuations in \citepunct!!!
  319. %
  320. % In Ref. Sec, a comma is placed before \&, even if no. of authors = 2.
  321. % \NoCommaBetweenTwoAuthors
  322. %      removes such commas in Ref. Sec.
  323. %      But, a comma will be still placed before \& if no. of authors >= 3.
  324. %
  325. %%%%%
  326. % [4] Changing Citation Labels
  327. %
  328. % \citelabels{editor label}%
  329. %            {editors label}%
  330. %            {volume label}%
  331. %            {number label}%
  332. %            {edition label}%
  333. %            {page label}%
  334. %            {pages label}%
  335. %            {chapter label}%
  336. %            {tech. rep. label}
  337. %
  338. % For example,
  339. %   \citelabels{, editor}{, editors}{Volume}{Number}{edition}%
  340. %              {page}{pages}{chapter}{Technical report}
  341. %
  342. % The default is:
  343. %   \citelabels{ (Ed.)}{ (Eds.)}{Vol.}{No.}{edition}%
  344. %              {p.}{pp.}{chap.}{Tech.\ rep.}
  345. %
  346. % Notice spaces around lables in \citelabels!!!
  347. %
  348. %%%%%
  349. % [5] Enforcing APA Style Section Heading 
  350. %
  351. %  A. Place one of the following between \documentstyle[...]{...}
  352. %     and \begin{document}:
  353. %
  354. %        \OneLevelHeading    \TwoLevelHeading   \TwoLevelHeadingA
  355. %        \ThreeLevelHeading  \FourLevelHeading  \FiveLevelHeading
  356. %
  357. %     to enforce APA style section heading.
  358. %
  359. %     Read the following notes to understand what they do.
  360. %
  361. %  B. The follow 5 levels of APA section headings are defined
  362. %       \levelone{...}
  363. %             ^^^   Normalsize, Centered, Uppercase, Boldface
  364. %       \leveltwo{...}
  365. %             ^^^   Normalsize, Centered, Boldfaced
  366. %       \levelthree{...}
  367. %             ^^^^^ Normalsize, Centered, Underlined
  368. %       \levelfour{...}
  369. %             ^^^^  Normalsize, Flushleft, Unindented, Underlined
  370. %       \levelfive{...}
  371. %             ^^^^  Normalsize, Flushleft, Indented, Underlined
  372. %                   followed by texts in the same line
  373. %
  374. %     However, you will *not* use \levelone{...}, \leveltwo{...}, etc.
  375. %     in your document. Instead, you will use \section*[...]{...},
  376. %      \subsection*[...]{...}, etc. Read the following notes.
  377. %
  378. %     Note: According to the APA manual (p. 66), Level One & Two
  379. %           Headings are NOT boldfaced. To strictly enforce
  380. %           APA requirements, remove \bf in \levelone and \leveltwo
  381. %           macros.
  382. %
  383. %  C. If you don't like spaces before and after section headings,
  384. %     modify \b@level@one@skip, \e@level@one@skip,
  385. %     \b@level@two@skip, \e@level@two@skip, etc.
  386. %     See comments around their definitions.
  387. %
  388. %  D. Level 3, 4, and 5 underlines are placed by \ULine{...}
  389. %     of ulem.sty ((C) Donald Arseneau) that is attached in the
  390. %     end of this file. This is because \ULine allows line
  391. %     breaks, while \underbar{...} and \underline{...} do not,
  392. %     when the heading is longer than the \textwidth (minus 8em).
  393. %     If you don't like the way \ULine places underlines,
  394. %     (1) replace \ULine in \levelthree, \levelfour, and \levelfive macros
  395. %     with \underbar or \underline. In that case, however, if the heading
  396. %     is long, LaTeX will complain about overfull \hbox; alternatively
  397. %     (2) modify and improve `ulem.sty' and send me a copy (thanks).
  398. %
  399. %  E. The APA manual suggests 6 ways of using heading levels:
  400. %     \OneLevelHeading:   \section       = \leveltwo (toc)
  401. %     \TwoLevelHeading:   \section       = \leveltwo (toc)
  402. %                         \subsection    = \levelfour (toc)
  403. %     \TwoLevelHeadingA:  \section       = \leveltwo (toc)
  404. %                         \subsection    = \levelfive
  405. %     \ThreeLevelHeading: \section       = \leveltwo (toc)
  406. %                         \subsection    = \levelfour (toc)
  407. %                         \subsubsection = \levelfive
  408. %     \FourLevelHeading:  \section       = \leveltwo (toc)
  409. %                         \subsection    = \levelthree (toc)
  410. %                         \subsubsection = \levelfour (toc)
  411. %                         \paragraph     = \levelfive
  412. %     \FiveLevelHeading:  \section       = \levelone (toc)
  413. %                         \subsection    = \leveltwo (toc)
  414. %                         \subsubsection = \levelthree (toc)
  415. %                         \paragraph     = \levelfour
  416. %                         \subparagraph  = \levelfive
  417. %
  418. %  F. \section{AAA}: AAA = heading, page head, table of contents
  419. %     \section*{AAA}: AAA = heading
  420. %     \section[BBB]{AAA}: AAA = heading; BBB = page head, table of contents
  421. %
  422. %     \subsection{AAA}: AAA = heading, table of contents
  423. %     \subsection*{AAA}: AAA = heading
  424. %     \subsection[BBB]{AAA}: AAA = heading; BBB = table of contents
  425. %
  426. %     (Exception: When \TwoLevelHeadingA is used -
  427. %      \subsection{AAA}: AAA = heading
  428. %      \subsection*{AAA} - not allowed
  429. %      \subsection[BBB]{AAA} - not allowed)
  430. %     
  431. %     \subsubsection{AAA}: AAA = heading, table of contents
  432. %     \subsubsection*{AAA}: AAA = heading
  433. %     \subsubsection[BBB]{AAA}: AAA = heading; BBB = table of contents
  434. %
  435. %     (Exception: When \ThreeLevelHeading is used -
  436. %      \subsubsection{AAA}: AAA = heading
  437. %      \subsubsection*{AAA} - not allowed
  438. %      \subsubsection[BBB]{AAA} - not allowed)
  439. %
  440. %     \paragraph{AAA}: AAA = heading
  441. %
  442. %     \subparagraph{AAA}: AAA = heading
  443. %
  444. %%%%%
  445. % [6] APA Seriations
  446. %
  447. %  A. seriate environment:
  448. %     For example, the following:
  449. %
  450. %        Blah blah blah
  451. %        \begin{seriate}
  452. %        \item first item,
  453. %        \item second item.
  454. %        \end{seriate}
  455. %        Blah blah blah
  456. %
  457. %      results in:
  458. %
  459. %        Blah blah blah (a) first item, (b) second item.  Blah blah blah
  460. %
  461. %  B. APAenumerate environment
  462. %     For example, the following:
  463. %
  464. %        Blah blah blah
  465. %        \begin{APAenumerate}
  466. %        \item first item ... ... ... continue continue
  467. %        \item second item ... ... ... continue continue
  468. %        \end{APAenumerate}
  469. %        Blah blah blah
  470. %
  471. %      results in:
  472. %
  473. %        Blah blah blah
  474. %            1. first item ... ... ...
  475. %        continue continue
  476. %            2. second item ... ... ...
  477. %        continue continue
  478. %        Blah blah blah
  479. %
  480. %  C. APAitemize environment
  481. %     For example, the following:
  482. %
  483. %        Blah blah blah
  484. %        \begin{APAitemize}
  485. %        \item first item ... ... ... continue continue
  486. %        \item second item ... ... ... continue continue
  487. %        \end{APAitemize}
  488. %        Blah blah blah
  489. %
  490. %      results in:
  491. %
  492. %        Blah blah blah
  493. %            o  first item ... ... ...
  494. %        continue continue
  495. %            o  second item ... ... ...
  496. %        continue continue
  497. %        Blah blah blah
  498. %
  499. %%%%%
  500. % [7] Others
  501. %
  502. %  A. If you use a language other than English,
  503. %     You probably want to change reference and bibliography names.
  504. %     Defaults are English names:
  505. %
  506. %     e.g. \def\refname{Reference}
  507. %     e.g. \def\bibname{Bibliography}
  508. %
  509. %     Place those definitions on the top of your document or
  510. %     before \bibliography or \begin{thebibliography}.
  511. %
  512. %  B. As default, BibTeX changes cases of article titles.
  513. %
  514. %     e.g. Your Entry in xxx.bib: Formal Representation of ZZZ
  515. %          Your will get:         Formal representation of zzz
  516. %     e.g. Your Entry in xxx.bib: Formal Representation of {ZZZ}
  517. %          Your will get:         Formal representation of ZZZ
  518. %
  519. %     If you don't want to change cases of article title, see
  520. %     Version 2.5 Update Notes in `theapa.bst'.
  521. %
  522. %  C. `mastersreport', `dbathesis', `eddthesis' added in theapa.bst.
  523. %      Why? - Some schools also allow master's report as well as
  524. %              master's thesis.
  525. %           - DBA (Doctor of Business Administration) and
  526. %             Ed.D. (Doctor of Education) are also popluar
  527. %             doctoral degrees.
  528. %
  529. %  D. Underlined (not italic) book titles, etc.
  530. %     - A few journal publication editors and schools,
  531. %       who do not appreciate new electronic typesetting and
  532. %       desktop publishing technologies, require underlined
  533. %       book titles, etc.
  534. %     - To do this, I included `ulem.sty' (C) 1989 by Donald Arseneau.
  535. %     - `\UnderlinedBemOnly' underlines book titles, etc. in Reference.
  536. %       `\UnderlinedEm' replaces emphasized texts by underlined texts
  537. %                       both in the body and references of your document.
  538. %
  539. %  E. Not implemented yet (!): to be implemented soon
  540. %     - None
  541. %
  542. %  F. Not implemented: I don't know if I can do in the near future !!! ;-)
  543. %     - Same last name but different people
  544. %
  545. %          (C. Lewis, 1958; D. Lewis, 1973)
  546. %           ^               ^
  547. %  G. NO GUARANTEE, absolutely (You know what I mean.)
  548. %
  549. %  H. Bug and/or suggestion reports
  550. %     - Your bug and/or suggestion report(s) is (are) welcome(d).
  551. %     - E-mail me:
  552. %
  553. %             young@emx.utexas.edu (Internet)
  554. %             ^^^^^
  555. %             youngr@utxvm (Bitnet)
  556. %                  ^
  557. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  558.  
  559. \typeout{APA Citation (& Optional APA Heading) Style - Version 2.5.1 (5/92)}
  560.  
  561. %%%%%%%%%%%%%%%%%%%%%%%%%%
  562. %%%%%%%%%%%%%%%%%%%%%%%%%%
  563. %% PART I: APA CITATION %%
  564. %%%%%%%%%%%%%%%%%%%%%%%%%%
  565. %%%%%%%%%%%%%%%%%%%%%%%%%%
  566.  
  567. %%%%%%%%%%%%%%%%%%%%%
  568. % cite punctuations %
  569. %%%%%%%%%%%%%%%%%%%%%
  570.  
  571. \def\BBOP{(}                % open parenthesis
  572. \def\BBAA{\&}               % between authors in parenthesis and ref. sec.
  573. \def\BBAB{and}              % between authors in text
  574. \def\BBAY{, }               % between author(s) and year
  575. \def\BBC{; }                % between cites
  576. \def\BBN{, }                % before note
  577. \def\BBCP{)}                % closing parenthesis
  578. \def\BBOQ{}                 % open quote for article title
  579. \def\BBCQ{.}                % closing quote for article title
  580. %
  581. \def\BBA{\BBAA}
  582. %
  583. \def\citepunct#1#2#3#4#5#6#7#8#9{%
  584.     \def\BBOP{#1}
  585.     \def\BBAA{#2}
  586.     \def\BBAB{#3}
  587.     \def\BBAY{#4}
  588.     \def\BBC{#5}
  589.     \def\BBN{#6}
  590.     \def\BBCP{#7}
  591.     \def\BBOQ{#8}
  592.     \def\BBCQ{#9}
  593.     \def\BBA{\BBAA}}
  594. %
  595. \def\BBACOMMA{,}       % comma between authors in ref. sec
  596.                            % when no. of authors = 2
  597. \def\NoCommaBetweenTwoAuthors{\def\BBACOMMA{}}
  598. %
  599. \let\Bem\em
  600.  
  601. %%%%%%%%%%%%%%%
  602. % cite labels %
  603. %%%%%%%%%%%%%%%
  604.  
  605. \def\BED{ (Ed.)}                % editor
  606. \def\BEDS{ (Eds.)}              % editors
  607. \def\BVOL{Vol.}                 % volume name
  608. \def\BNUM{No.}                  % number name
  609. \def\BEd{edition}               % edition
  610. \def\BPG{p.}                    % page
  611. \def\BPGS{pp.}                  % pages
  612. \def\BCH{chap.}                 % chapter
  613. \def\BTR{Tech.\ rep.}           % (default) technical report type name
  614.  
  615. \def\citelabels#1#2#3#4#5#6#7#8#9{%
  616.      \def\BED{#1}                % editor
  617.      \def\BEDS{#2}
  618.      \def\BVOL{#3}
  619.      \def\BNUM{#4}
  620.      \def\BEd{#5}                % edition
  621.      \def\BPG{#6}
  622.      \def\BPGS{#7}
  623.      \def\BCH{#8}
  624.      \def\BTR{#9}}
  625.  
  626. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  627. % Upper or Lowercase article titles %
  628. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  629. %
  630. % \BUcase is dropped in theapa.bst Version 2.5.
  631. % The following three lines are not required in Version 2.5.
  632. % They are here temporally to maintain some compatibility with
  633. % Version 2.4; but will be removed in the next revision.
  634. \def\@Ucase#1{\uppercase{#1}}
  635. \def\BUcase#1{\lowercase{\@Ucase #1}}
  636. \def\NoTitleCaseChange{\def\BUcase##1{##1}}
  637.  
  638. %%%%%%%%%%%%%
  639. % citations %
  640. %%%%%%%%%%%%%
  641.  
  642. \def\@lbibitem[#1]#2{\def\BBA{\BBAA}\item[\@biblabel{#1}]\if@filesw
  643.       { \def\BBA{\string\BBA}%
  644.         \def\protect##1{\string ##1\space}\immediate
  645.         \write\@auxout{\string\bibcite{#2}{#1}}%
  646.     \def\BBA{\BBAA}}\fi\ignorespaces}
  647.  
  648. % Year is separately handled by \Y<citation key>
  649. \def\bibcite#1#2{\global\expandafter\def\csname b@#1\endcsname{#2}% names
  650.     \global\expandafter\def\csname Y@#1\endcsname{\@year@#2}}% year
  651. \def\@year@\BCAY#1#2#3{#3}
  652.  
  653. % first author of a multi-author reference?
  654. \newif\if@F@cite\@F@citetrue
  655.  
  656. %
  657. % \cite<prefix>[postfix]{keys}
  658. % \fullcite<prefix>[postfix]{keys}
  659. % \shortcite<prefix>[postfix]{keys}
  660. %    writes \citation{keys} on .aux
  661. %    produces (prefix Authors1, Year1; Authors2, Year2; ..., postfix)
  662. %
  663.  
  664. \def\cite{\def\BCAY##1##2##3{\BCA{##1}{##2}}%
  665.     \@ifnextchar<{\@cite}{\@cite<>}}
  666.  
  667. \def\fullcite{\def\BCAY##1##2##3{\BCA{##1}{##1}}%
  668.     \@ifnextchar<{\@cite}{\@cite<>}}
  669.  
  670. \def\shortcite{\def\BCAY##1##2##3{\BCA{##2}{##2}}%
  671.     \@ifnextchar<{\@cite}{\@cite<>}}
  672.  
  673. \def\@cite<#1>{\@ifnextchar[{\def\@BBN{\BBN}\@@cite<#1>}%
  674.                              {\def\@BBN{\ignorespaces}\@@cite<#1>[]}}
  675. \def\@@cite<#1>[#2]#3{%
  676.     \if@filesw\immediate\write\@auxout{\string\citation{#3}}\fi%
  677.     \edef\@citeP{}%
  678.     \BBOP{\ignorespaces#1\space}%
  679.     \@for\@citeb:=#3\do{%
  680.     \@ifundefined{b@\@citeb}%
  681.      {\expandafter\def\csname b@\@citeb\endcsname{?}%
  682.       \expandafter\def\csname Y@\@citeb\endcsname{?}%
  683.       \@warning{Citation `\@citeb' on page \thepage\space undefined}%
  684.      }%
  685.      {\@ifundefined{flag@\@citeb}%
  686.       {\global\expandafter\def\csname flag@\@citeb\endcsname{DUMMY}%
  687.        \def\BCA##1##2{##1}}%
  688.       {\def\BCA##1##2{##2}}%
  689.      }%
  690.     \edef\B@my@dummy{\csname b@\@citeb\endcsname}%
  691.     \ifx\@citeP\B@my@dummy%
  692.         \if@F@cite\@F@citefalse\else{,\ }\fi%
  693.     \csname Y@\@citeb\endcsname%
  694.     \else%
  695.         \if@F@cite\@F@citefalse\else{\BBC}\fi%
  696.     \edef\@cite@undefined{?}%
  697.     \ifx\@cite@undefined\B@my@dummy%
  698.       \csname Y@\@citeb\endcsname%
  699.     \else%
  700.       \def\BBA{\BBAA}%
  701.       \csname b@\@citeb\endcsname\BBAY\csname Y@\@citeb\endcsname%
  702.         \fi%
  703.     \fi%
  704.     \edef\@citeP{\csname b@\@citeb\endcsname}%
  705.     }{\@BBN #2}\BBCP%
  706.     \@F@citetrue}
  707.  
  708. %
  709. % \citeA[postfix]{keys}
  710. % \fullciteA[postfix]{keys}
  711. % \shortciteA[postfix]{keys}
  712. %    writes \citation{keys} on .aux
  713. %    produces Authors1 (Year1), ..., AuthorN (YearN, postfix)
  714. %
  715.  
  716. \def\citeA{\def\BCAY##1##2##3{\BCA{##1}{##2}}%
  717.            \@ifnextchar[{\def\@BBN{\BBN}\@citeA}%
  718.                         {\def\@BBN{\ignorespaces}\@citeA[]}}
  719.  
  720. \def\fullciteA{\def\BCAY##1##2##3{\BCA{##1}{##1}}%
  721.            \@ifnextchar[{\def\@BBN{\BBN}\@citeA}%
  722.                         {\def\@BBN{\ignorespaces}\@citeA[]}}
  723.  
  724. \def\shortciteA{\def\BCAY##1##2##3{\BCA{##2}{##2}}%
  725.            \@ifnextchar[{\def\@BBN{\BBN}\@citeA}%
  726.                         {\def\@BBN{\ignorespaces}\@citeA[]}}
  727.  
  728. \def\@citeA[#1]#2{%
  729.     \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  730.     \edef\@citeP{}%
  731.     \@for\@citeb:=#2\do{%
  732.     \@ifundefined{b@\@citeb}%
  733.      {\expandafter\def\csname b@\@citeb\endcsname{?}%
  734.       \expandafter\def\csname Y@\@citeb\endcsname{?}%
  735.       \@warning{Citation `\@citeb' on page \thepage\space undefined}%
  736.      }%
  737.      {\@ifundefined{flag@\@citeb}%
  738.       {\global\expandafter\def\csname flag@\@citeb\endcsname{DUMMY}%
  739.        \def\BCA##1##2{##1}}%
  740.       {\def\BCA##1##2{##2}}%
  741.      }%
  742.     \edef\B@my@dummy{\csname b@\@citeb\endcsname}%
  743.     \ifx\@citeP\B@my@dummy%
  744.         \if@F@cite\@F@citefalse\else{,\ }\fi%
  745.     \csname Y@\@citeb\endcsname%
  746.     \else%
  747.         \if@F@cite\@F@citefalse\else{\BBCP,\ }\fi%
  748.         \def\BBA{\BBAB}%
  749.     \csname b@\@citeb\endcsname\ \BBOP\csname Y@\@citeb\endcsname%
  750.     \fi%
  751.     \edef\@citeP{\csname b@\@citeb\endcsname}%
  752.     }{\@BBN #1}\BBCP%
  753.     \@F@citetrue}
  754.  
  755. %
  756. % \citeauthor{keys}
  757. % \fullciteauthor{keys}
  758. % \shortciteauthor{keys}
  759. %    writes \citation{keys} on .aux
  760. %    produces Authors1, ..., AuthorN
  761. %
  762.  
  763. \def\citeauthor{\def\BCAY##1##2##3{\BCA{##1}{##2}}\@citeauthor}
  764.  
  765. \def\fullciteauthor{\def\BCAY##1##2##3{\BCA{##1}{##1}}\@citeauthor}
  766.  
  767. \def\shortciteauthor{\def\BCAY##1##2##3{\BCA{##2}{##2}}\@citeauthor}
  768.  
  769. \def\@citeauthor#1{%
  770.     \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi%
  771.     \edef\@citeP{}%
  772.     \@for\@citeb:=#1\do{%
  773.     \@ifundefined{b@\@citeb}%
  774.      {\expandafter\def\csname b@\@citeb\endcsname{?}%
  775.       \expandafter\def\csname Y@\@citeb\endcsname{?}%
  776.       \@warning{Citation `\@citeb' on page \thepage\space undefined}%
  777.      }%
  778.      {\@ifundefined{flag@\@citeb}%
  779.       {\global\expandafter\def\csname flag@\@citeb\endcsname{DUMMY}%
  780.        \def\BCA##1##2{##1}}%
  781.       {\def\BCA##1##2{##2}}%
  782.      }%
  783.     \edef\B@my@dummy{\csname b@\@citeb\endcsname}%
  784.     \ifx\@citeP\B@my@dummy%
  785.     \else%
  786.         \if@F@cite\@F@citefalse\else{,\ }\fi%
  787.         \def\BBA{\BBAB}%
  788.     \csname b@\@citeb\endcsname%\ \BBOP\csname Y@\@citeb\endcsname%
  789.     \fi%
  790.     \edef\@citeP{\csname b@\@citeb\endcsname}%
  791.     }%
  792.     \@F@citetrue}
  793.  
  794. %
  795. % \citeyear[postfix]{keys}
  796. %    writes \citation{keys} on .aux
  797. %    produces (Year1, ..., YearN, postfix)
  798. %
  799.  
  800. \def\citeyear{\def\BCAY##1##2##3{}%
  801.            \@ifnextchar[{\def\@BBN{\BBN}\@citeyear}%
  802.                         {\def\@BBN{\ignorespaces}\@citeyear[]}}
  803.  
  804. \def\@citeyear[#1]#2{%
  805.     \if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi%
  806.     \edef\@citeP{}%
  807.     \BBOP\@for\@citeb:=#2\do{%
  808.     \@ifundefined{b@\@citeb}%
  809.      {\expandafter\def\csname b@\@citeb\endcsname{?}%
  810.       \expandafter\def\csname Y@\@citeb\endcsname{?}%
  811.       \@warning{Citation `\@citeb' on page \thepage\space undefined}%
  812.      }%
  813.      {\@ifundefined{flag@\@citeb}%
  814.       {\global\expandafter\def\csname flag@\@citeb\endcsname{DUMMY}}%
  815.       {}%
  816.      }%
  817.     \edef\B@my@dummy{\csname b@\@citeb\endcsname}%
  818.     \if@F@cite\@F@citefalse\else{,\ }\fi%
  819.     \csname Y@\@citeb\endcsname%
  820.     \edef\@citeP{\csname b@\@citeb\endcsname}%
  821.     }{\@BBN #1}\BBCP%
  822.     \@F@citetrue}
  823.  
  824. \def\nocite#1{\@bsphack%
  825.     \if@filesw\immediate\write\@auxout{\string\citation{#1}}\fi%
  826.     \@for\@citeb:=#1\do{%
  827.     \@ifundefined{b@\@citeb}%
  828.     {\edef\B@my@dummy{*}%
  829.      \ifx\@citeb\B@my@dummy\else
  830.      \@warning{Citation `\@citeb' on page \thepage\space undefined}\fi}%
  831.     {\global\expandafter\def\csname flag@\@citeb\endcsname{DUMMY}}}%
  832.     \@esphack}
  833.  
  834. %
  835. % To maintain compatibility with Version 2.4
  836. % \citeB = \citeA
  837. % \fullciteB = \fullciteA
  838. % \shortciteB = \shortciteA
  839. % \citeC = \citeauthor
  840. % \fullciteC = \fullciteauthor
  841. % \shortciteC = \shortciteauthor
  842.  
  843. \let\citeB=\citeA
  844. \let\fullciteB=\fullciteA
  845. \let\shortciteB=\shortciteA
  846.  
  847. \let\citeC=\citeauthor
  848. \let\fullciteC=\fullciteauthor
  849. \let\shortciteC=\shortciteauthor
  850.  
  851. %
  852. % No labels in the bibliography.
  853. \def\@biblabel#1{}
  854. \newskip{\bibleftmargin}
  855. \bibleftmargin=2.5em
  856. %
  857. %\def\refname{Reference}                %<------------------------------------
  858. %\def\bibname{Bibliography}
  859. %
  860. \def\thebibliography#1{%
  861.      \@ifundefined{chapter}%
  862.        {\section*{\refname}%
  863.         \@mkboth{\uppercase{\refname}}{\uppercase{\refname}}
  864.         \addcontentsline{toc}{section}{\refname}}%
  865.        {\chapter*{\bibname}%
  866.         \@mkboth{\uppercase{\bibname}}{\uppercase{\bibname}}
  867.         \addcontentsline{toc}{chapter}{\bibname}}
  868.      \list
  869.      {\relax}{\labelsep=0em
  870.               \leftmargin=\bibleftmargin
  871.           \itemindent=-\bibleftmargin}
  872.      \def\newblock{\hskip .11em plus .33em minus .07em}
  873.      \sloppy\clubpenalty4000\widowpenalty4000
  874.      \sfcode`\.=1000\relax}
  875. \let\endthebibliography=\endlist
  876.  
  877. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  878. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  879. %% PART II: APA SECTION HEADING & SERIATION %%
  880. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  881. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  882.  
  883. %
  884. % \apa@startsection{Heading Indent}{Beforeskip}{Afterskip}{Heading}
  885. %
  886. \def\apa@startsection#1#2#3{\@startsection{}{}{#1}{#2}{#3}{\relax}*}
  887.  
  888. %
  889. % \b@level@LEVEL-NO@skip
  890. %       Skip before heading: If >= 0, the following par is NOT indented.
  891. %                            If < 0, it is indented.
  892. %                            \b@level@LEVEL-NO@skip = vertical skip
  893. %
  894. % \e@level@LEVEL-NO@skip
  895. %       Skip after heading: If > 0, the following par starts in a new line;
  896. %                               \e@level@LEVEL-NO@skip = vertical skip
  897. %                           If <= 0, it starts just after the heading;
  898. %                               \e@level@LEVEL-NO@skip = horizontal skip
  899. %
  900. \newskip\b@level@one@skip   \b@level@one@skip=2.5ex plus 1ex minus .2ex
  901. \newskip\e@level@one@skip   \e@level@one@skip=1.5ex plus .6ex minus .1ex
  902. \newskip\b@level@two@skip   \b@level@two@skip=2.5ex plus 1ex minus .2ex
  903. \newskip\e@level@two@skip   \e@level@two@skip=1.5ex plus .6ex minus .1ex
  904. \newskip\b@level@three@skip \b@level@three@skip=2.0ex plus .8ex minus .2ex
  905. \newskip\e@level@three@skip \e@level@three@skip=1.5ex plus .6ex minus .1ex
  906. \newskip\b@level@four@skip  \b@level@four@skip=1.8ex plus .8ex minus .2ex
  907. \newskip\e@level@four@skip  \e@level@four@skip=1.5ex plus .6ex minus .1ex
  908. \newskip\b@level@five@skip  \b@level@five@skip=1.8ex plus .8ex minus .2ex
  909. \newskip\e@level@five@skip  \e@level@five@skip=0ex
  910.  
  911. %
  912. % (APA, p. 66)
  913. % Level One:   Centered Boldface Uppercase Heading
  914. % Level Two:   Centered Boldface Heading
  915. % Level Three: Centered Underlined Heading
  916. % Level Four:  Flushleft Underlined Heading occuping a whole line
  917. % Level Five:  Intended Underlined Heading followed by texts in the same line
  918. %
  919. % NOTE: According to the APA manual, Level One & Two headings are 
  920. %       NOT boldfaced. If you want to follow the manual strictly,
  921. %       remove \bf in \levelone and \leveltwo macros.
  922. %
  923. \def\levelone#1{\apa@startsection%
  924.     {\z@}{\b@level@one@skip}{\e@level@one@skip}%
  925.     {\leftskip4em plus 1fill\rightskip\leftskip\parindent\z@\relax%
  926.      \bf\uppercase\expandafter{#1}}}    % <- \bf
  927. \def\leveltwo#1{\apa@startsection%
  928.     {\z@}{\b@level@two@skip}{\e@level@two@skip}%
  929.     {\leftskip4em plus 1fill\rightskip\leftskip\parindent\z@\relax%
  930.      \bf #1}}                % <- \bf
  931. \def\levelthree#1{\apa@startsection%
  932.     {\z@}{\b@level@three@skip}{\e@level@three@skip}%
  933.     {\leftskip4em plus 1fill\rightskip\leftskip\parindent\z@\relax%
  934.     \ULine{#1}}}
  935. \def\levelfour#1{\apa@startsection%
  936.     {\z@}{\b@level@four@skip}{\e@level@four@skip}{\ULine{#1}}}
  937. \def\levelfive#1{\apa@startsection%
  938.     {\parindent}{\b@level@five@skip}{\e@level@five@skip}{\ULine{#1}.}}
  939.  
  940. %
  941. % Selecting the Levels of Headings (APA, pp. 66-67)
  942. %
  943.  
  944. % One Level
  945. \def\OneLevelHeading{%
  946.     \def\section{\@ifnextchar*{\@sections}%
  947.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  948.     \def\@sections*##1{\leveltwo{##1}}%
  949.     \def\@sectionb[##1]##2{\leveltwo{##2}%
  950.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  951.         \addcontentsline{toc}{section}{##1}}%
  952.     \def\@section##1{\leveltwo{##1}%
  953.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  954.         \addcontentsline{toc}{section}{##1}}%
  955. }
  956.  
  957. % Two Levels
  958. \def\TwoLevelHeading{%
  959.     \def\section{\@ifnextchar*{\@sections}%
  960.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  961.     \def\@sections*##1{\leveltwo{##1}}%
  962.     \def\@sectionb[##1]##2{\leveltwo{##2}%
  963.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  964.         \addcontentsline{toc}{section}{##1}}%
  965.     \def\@section##1{\leveltwo{##1}%
  966.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  967.         \addcontentsline{toc}{section}{##1}}%
  968. %
  969.     \def\subsection{\@ifnextchar*{\@subsections}%
  970.                    {\@ifnextchar[{\@subsectionb}{\@subsection}}}%
  971.     \def\@subsections*##1{\levelfour{##1}}%
  972.     \def\@subsectionb[##1]##2{\levelfour{##2}%
  973.         \addcontentsline{toc}{subsection}{##1}}%
  974.     \def\@subsection##1{\levelfour{##1}%
  975.         \addcontentsline{toc}{subsection}{##1}}%
  976. }
  977.  
  978. % Two Levels - Variation
  979. \def\TwoLevelHeadingA{%
  980.     \def\section{\@ifnextchar*{\@sections}%
  981.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  982.     \def\@sections*##1{\leveltwo{##1}}%
  983.     \def\@sectionb[##1]##2{\leveltwo{##2}%
  984.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  985.         \addcontentsline{toc}{section}{##1}}%
  986.     \def\@section##1{\leveltwo{##1}%
  987.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  988.         \addcontentsline{toc}{section}{##1}}%
  989. %
  990.     \let\subsection=\levelfive%
  991. }
  992.  
  993. % Three Levels
  994. \def\ThreeLevelHeading{%
  995.     \def\section{\@ifnextchar*{\@sections}%
  996.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  997.     \def\@sections*##1{\leveltwo{##1}}%
  998.     \def\@sectionb[##1]##2{\leveltwo{##2}%
  999.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1000.         \addcontentsline{toc}{section}{##1}}%
  1001.     \def\@section##1{\leveltwo{##1}%
  1002.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1003.         \addcontentsline{toc}{section}{##1}}%
  1004. %
  1005.     \def\subsection{\@ifnextchar*{\@subsections}%
  1006.                    {\@ifnextchar[{\@subsectionb}{\@subsection}}}%
  1007.     \def\@subsections*##1{\levelfour{##1}}%
  1008.     \def\@subsectionb[##1]##2{\levelfour{##2}%
  1009.         \addcontentsline{toc}{subsection}{##1}}%
  1010.     \def\@subsection##1{\levelfour{##1}%
  1011.         \addcontentsline{toc}{subsection}{##1}}%
  1012. %
  1013.     \let\subsubsection=\levelfive
  1014. % If you want subsubsection headings listed in the table of contents
  1015. % remove the above \let\subsub... and uncomment the following.
  1016. %    \def\subsubsection{\@ifnextchar*{\@subsubsections}%
  1017. %                      {\@ifnextchar[{\@subsubsectionb}{\@subsubsection}}}%
  1018. %    \def\@subsubsections*##1{\levelfive{##1}}%
  1019. %    \def\@subsubsectionb[##1]##2{\levelfive{##2}%
  1020. %        \addcontentsline{toc}{subsubsection}{##1}}%
  1021. %    \def\@subsubsection##1{\levelfive{##1}%
  1022. %        \addcontentsline{toc}{subsubsection}{##1}}%
  1023. }
  1024.  
  1025. % Four Levels
  1026. \def\FourLevelHeading{%
  1027.     \def\section{\@ifnextchar*{\@sections}%
  1028.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  1029.     \def\@sections*##1{\leveltwo{##1}}%
  1030.     \def\@sectionb[##1]##2{\leveltwo{##2}%
  1031.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1032.         \addcontentsline{toc}{section}{##1}}%
  1033.     \def\@section##1{\leveltwo{##1}%
  1034.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1035.         \addcontentsline{toc}{section}{##1}}%
  1036. %
  1037.     \def\subsection{\@ifnextchar*{\@subsections}%
  1038.                    {\@ifnextchar[{\@subsectionb}{\@subsection}}}%
  1039.     \def\@subsections*##1{\levelthree{##1}}%
  1040.     \def\@subsectionb[##1]##2{\levelthree{##2}%
  1041.         \addcontentsline{toc}{subsection}{##1}}%
  1042.     \def\@subsection##1{\levelthree{##1}%
  1043.         \addcontentsline{toc}{subsection}{##1}}%
  1044. %
  1045.     \def\subsubsection{\@ifnextchar*{\@subsubsections}%
  1046.                       {\@ifnextchar[{\@subsubsectionb}{\@subsubsection}}}%
  1047.     \def\@subsubsections*##1{\levelfour{##1}}%
  1048.     \def\@subsubsectionb[##1]##2{\levelfour{##2}%
  1049.         \addcontentsline{toc}{subsubsection}{##1}}%
  1050.     \def\@subsubsection##1{\levelfour{##1}%
  1051.         \addcontentsline{toc}{subsubsection}{##1}}%
  1052. %
  1053.     \let\paragraph=\levelfive%
  1054. }
  1055.  
  1056. % Five Levels
  1057. \def\FiveLevelHeading{%
  1058.     \def\section{\@ifnextchar*{\@sections}%
  1059.                 {\@ifnextchar[{\@sectionb}{\@section}}}%
  1060.     \def\@sections*##1{\levelone{##1}}%
  1061.     \def\@sectionb[##1]##2{\levelone{##2}%
  1062.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1063.         \addcontentsline{toc}{section}{##1}}%
  1064.     \def\@section##1{\levelone{##1}%
  1065.         \@mkboth{\uppercase{##1}}{\uppercase{##1}}%
  1066.         \addcontentsline{toc}{section}{##1}}%
  1067. %
  1068.     \def\subsection{\@ifnextchar*{\@subsections}%
  1069.                    {\@ifnextchar[{\@subsectionb}{\@subsection}}}%
  1070.     \def\@subsections*##1{\leveltwo{##1}}%
  1071.     \def\@subsectionb[##1]##2{\leveltwo{##2}%
  1072.         \addcontentsline{toc}{subsection}{##1}}%
  1073.     \def\@subsection##1{\leveltwo{##1}%
  1074.         \addcontentsline{toc}{subsection}{##1}}%
  1075. %
  1076.     \def\subsubsection{\@ifnextchar*{\@subsubsections}%
  1077.                       {\@ifnextchar[{\@subsubsectionb}{\@subsubsection}}}%
  1078.     \def\@subsubsections*##1{\levelthree{##1}}%
  1079.     \def\@subsubsectionb[##1]##2{\levelthree{##2}%
  1080.         \addcontentsline{toc}{subsubsection}{##1}}%
  1081.     \def\@subsubsection##1{\levelthree{##1}%
  1082.         \addcontentsline{toc}{subsubsection}{##1}}%
  1083. %
  1084.     \let\paragraph=\levelfour%
  1085.     \let\subparagraph=\levelfive%
  1086. }
  1087.  
  1088. %
  1089. % Seriations (pp. 66-68): ONE level of seriation only.
  1090. %  \begin{seriate} \item ... \end{seriate}
  1091. %           within a paragraph or sentence
  1092. %  \begin{APAenumerate} \item ... \end{APAenumerate}
  1093. %           at the start of each paragraph in a series
  1094. %           with enumeration
  1095. %  \begin{APAitemize} \item ... \end{APAitemize}
  1096. %           at the start of each paragraph in a series
  1097. %           without enumeration
  1098. %
  1099.  
  1100. % Refer to LaTeX book to modify, if you want, spaces before and after of
  1101. %  \begin{...} ... \end{...} or spaces between \item-s.
  1102. \newcounter{APAenum}
  1103. \newskip\@text@par@indent
  1104. \def\APAenumerate{\@text@par@indent\parindent\setbox0\hbox{1. }%
  1105.     \list{\arabic{APAenum}.}{\usecounter{APAenum}
  1106.     \labelwidth\z@\labelsep\z@\leftmargin\z@\parsep\z@
  1107.     \rightmargin\z@\itemsep\z@\topsep\z@\partopsep\z@
  1108.     \itemindent\@text@par@indent\advance\itemindent by\wd0
  1109.     \def\makelabel##1{\hss\llap{##1 }}}}
  1110. \let\endAPAenumerate=\endlist
  1111.  
  1112. \def\seriate{\@bsphack\begingroup%
  1113.    \setcounter{APAenum}{0}%
  1114.    \def\item{\addtocounter{APAenum}{1}(\alph{APAenum})\space}%
  1115.    \ignorespaces}
  1116. \def\endseriate{\endgroup\@esphack}
  1117.  
  1118. \def\APAitemize{\@text@par@indent\parindent\setbox0\hbox{$\bullet$}%
  1119.     \list{$\bullet$}{%
  1120.     \labelwidth\z@\labelsep.5em\leftmargin\z@\parsep\z@
  1121.     \rightmargin\z@\itemsep\z@\topsep\z@\partopsep\z@
  1122.     \itemindent\@text@par@indent
  1123.     \advance\itemindent by\wd0\advance\itemindent by.5em
  1124.     \def\makelabel##1{\hss\llap{##1}}}}
  1125. \let\endAPAitemize=\endlist
  1126.  
  1127. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1128. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1129. %% PART III: UNDELINE STUFF (ulem.sty) %%
  1130. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1131. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1132.  
  1133. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1134. % ulem.sty - Copyright (c) 1989 by Donald Arseneau                     %
  1135. %                                                                      %
  1136. %  These macros may be freely transmitted, reproduced, or modified for %
  1137. %  non-commercial purposes provided that this notice is left intact.   %
  1138. %  (Donald Arseneau's Copyright Notice)                                %
  1139. %                                                                      %
  1140. %  Comments on macros are removed. Please refer to the ulem.sty file   %
  1141. %  for detailed macros.                                                %
  1142. %                                                                      %
  1143. %  Two ways to underline texts:                                        %
  1144. %     {\ULem Blah Blah Blah}                                           %
  1145. %     ^                    ^                                           %
  1146. %     \ULine{Blah Blah Blah}                                           %
  1147. %           ^              ^                                           %
  1148. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1149.  
  1150. \def\ULem{\let\em\LA@em
  1151.    \expandafter\UL@on\expandafter{\ifnum0=`}\fi}
  1152. \def\ULine{\bgroup\UL@on}
  1153. \let\LA@em\em
  1154.  
  1155. %\let\em\ULem
  1156. %\def\normalem{\let\em\LA@em}
  1157.  
  1158. % The above 2 lines are replaced with the following 2 lines by Young Ryu.
  1159. \def\UnderlinedBemOnly{\let\Bem\ULem}
  1160. \def\UnderlinedEm{\let\em\ULem \let\Bem\ULem}
  1161.  
  1162. \newbox\UL@hyphenbox
  1163. \newbox\UL@box
  1164. \newcount\UL@spfactor
  1165. \newcount\UL@penalty
  1166. \newskip\UL@skip
  1167. \newdimen\UL@lht
  1168. \newdimen\UL@ldp
  1169.  
  1170. \let\LA@space\ \let\LA@hskip\hskip
  1171.  
  1172. \def\UL@end*{\relax\relax}
  1173.  
  1174. \def\UL@on#1{\leavevmode\everymath{\UL@hrest}\let\-\UL@dischyp
  1175.     \let\ \UL@space \let\hskip\UL@hskip
  1176.     \setbox\UL@box\hbox{(}\UL@ldp\dp\UL@box \UL@lht-\UL@ldp\advance\UL@lht.4\p@
  1177.     \setbox\UL@hyphenbox\hbox{\setbox\UL@box\hbox{-}\UL@putbox}%
  1178.     \UL@word#1\global\UL@spfactor\spacefactor{} \UL@end* }
  1179.  
  1180. \let\UL@unegroup\@empty
  1181.  
  1182. \def\UL@start{\setbox\UL@box\hbox\bgroup\everyhbox{\UL@hrest}%
  1183.     \let\UL@start\@empty \let\UL@putbox\@empty \let\UL@unegroup\bgroup
  1184.     \kern-3sp\kern3sp}
  1185.  
  1186. \def\UL@stop{\global\UL@penalty\lastpenalty
  1187.    \ifdim\lastkern=3sp \egroup
  1188.       \ifdim\wd\UL@box=\z@
  1189.       \else \UL@putbox \fi
  1190.    \else
  1191.       \egroup \UL@putbox
  1192.    \fi\UL@unegroup}
  1193.  
  1194. \def\UL@putbox{{\UL@skip\wd\UL@box \advance\UL@skip\UL@pixel
  1195.    \vrule \@height\UL@lht \@depth\UL@ldp \@width\UL@skip
  1196.    \kern-\UL@skip}\box\UL@box
  1197.    \ifnum\UL@penalty=\z@ \else \penalty\UL@penalty \fi}
  1198.  
  1199. \def\UL@word#1 {\UL@start#1 \ifx\UL@end#1\egroup
  1200.       \unkern \unskip
  1201.       \spacefactor\UL@spfactor \let\UL@word\egroup
  1202.    \else
  1203.       \ifmmode\else \ifdim\lastskip=\z@\else
  1204.           \global\UL@skip\lastskip \unskip
  1205.           \UL@stop \UL@leaders
  1206.       \fi\fi
  1207.    \fi \UL@word}
  1208.  
  1209. \newdimen\UL@pixel \UL@pixel=0.0033333truein
  1210.  
  1211. \def\UL@leaders{{\advance \UL@skip \UL@pixel
  1212.    \leaders\hrule \@height\UL@lht \@depth\UL@ldp\LA@hskip\UL@skip
  1213.    \kern-\UL@pixel}}
  1214.  
  1215. \def\UL@hskip{\afterassignment\UL@reskip \global\UL@skip}
  1216.  
  1217. \def\UL@reskip{\UL@stop \UL@leaders \UL@start}
  1218.  
  1219. \def\UL@hrest{\let\hskip\LA@hskip \let\ \LA@space \let\-\UL@dischyp}
  1220.  
  1221. \def\UL@space{\LA@space \global\UL@skip\lastskip \unskip \UL@reskip}
  1222.  
  1223. \def\UL@dischyp{\penalty\z@
  1224.                \UL@stop \discretionary{\copy\UL@hyphenbox}{}{}\UL@start}
  1225.  
  1226. %%%%%%%%%%%%%%%%%%%%%%%%%%% End of ulem.sty %%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.